import request from '@/utils/request'

// 查询市场回访历史统计列表
export function listHistory(query) {
  return request({
    url: '/erp/history/list',
    method: 'get',
    params: query,
  })
}

// 查询市场回访历史统计详细
export function getHistory(id) {
  return request({
    url: '/erp/history/' + id,
    method: 'get',
  })
}

// 新增市场回访历史统计
export function addHistory(data) {
  return request({
    url: '/erp/history',
    method: 'post',
    data: data,
  })
}

// 修改市场回访历史统计
export function updateHistory(data) {
  return request({
    url: '/erp/history',
    method: 'put',
    data: data,
  })
}

// 删除市场回访历史统计
export function delHistory(id) {
  return request({
    url: '/erp/history/' + id,
    method: 'delete',
  })
}

// 导出市场回访历史统计
export function exportHistory(query) {
  return request({
    url: '/erp/history/export',
    method: 'get',
    params: query,
  })
}

export function statisticsListHisTory(query) {
  return request({
    url: '/erp/history/list/statistics',
    method: 'get',
    params: query,
  })
}
